package com.zhuoyue.common.core.domain;

import com.zhuoyue.common.core.domain.entity.SysDept;

import java.util.stream.Collectors;

/**
 * @Author zhanghui
 * @Date: 2021/07/30/9:18
 * @Description:
 */
public class DeptTreeSelect extends TreeSelect {
    private String orgCode;


    public DeptTreeSelect(SysDept dept) {
        this.id = dept.getDeptId();
        this.label = dept.getDeptName();
        this.orgCode = dept.getOrgCode();
        this.children = dept.getChildren().stream().map(DeptTreeSelect::new).collect(Collectors.toList());
    }

    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }
}
